<div id="mywebgl" style="width:400px;height:300px;outline: 1px solid red;"></div>
<script type="module">
    import { WebGL } from 'vislite';

    var painter = new WebGL(document.getElementById('mywebgl'));

    painter.render({
        mesh: [{
            geometry: {
                attributes: {
                    position: {
                        array: [
                            -1, 1, 1,
                            1, 1, -1,
                            -1, -1, 0
                        ],
                        count: 3,
                        itemSize: 3
                    }
                },
                type: "TRIANGLES"
            },
            material: {
                color: {
                    r: 1,
                    g: 0,
                    b: 0,
                    alpha: 1
                }
            }
        }]
    });
</script>